﻿/*
 * Created by SharpDevelop.
 * User: xieen
 * Date: 2013-08-23
 * Time: 16:21
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Collections.Generic;
using BH = GoF23Learning._22.Chain_of_Responsibility.Refactor.BaseHandler;

namespace GoF23Learning._22.Chain_of_Responsibility
{
	/// <summary>
	/// Description of Send.
	/// </summary>
	public class App
	{
		public void Process()
		{
			List<BaseHandler> handlerList =new List<BaseHandler>();
			handlerList.Add(new AjaxHandler());
			handlerList.Add(new PageHandler());
			
			Request req = new Request();
			foreach (BaseHandler handler in handlerList) {
				if( handler.CandRequest(req)){
					handler.Request();
				}
			}
		}	
	}
}
